const SYSTEM_INFO = uni.getSystemInfoSync()

// 获取状态栏高度
export const getStatusBarHeight = ()=>SYSTEM_INFO.statusBarHeight || 0

// 获取胶囊按钮导航栏高度
export const getTitleBarHeight = ()=>{
	if(uni.getMenuButtonBoundingClientRect){
		console.log(uni.getMenuButtonBoundingClientRect())
		console.log(getStatusBarHeight())
		const {top,height} = uni.getMenuButtonBoundingClientRect()
		let titleBarHeight  = (top - getStatusBarHeight())*2+height
		return titleBarHeight
	} else {
		return 40;
	}
}